import type { Meta, StoryObj } from '@storybook/react'
import Alert from './alert'

const alearMeta = {
  title: '狗狗组件/Alert',
  id: 'Alert',
  component: Alert,
  tags: ['autodocs'] // 自动生成文档
} satisfies Meta<typeof Alert>
export default alearMeta
type Story = StoryObj<typeof alearMeta> // 定义组件的默认参数

export const DefaultAlert: Story = {
  args: {
    title: 'this is default',
    description: 'this is default description'
  }
}
DefaultAlert.storyName = '默认提示'

export const ThemeAlert = () => {
  return (
    <>
      <Alert title="this is default"></Alert>
      <Alert title="this is Success" type="success"></Alert>
      <Alert title="this is Danger!" type="danger"></Alert>
      <Alert title="this is Warning!" type="warning" closable={false}></Alert>
    </>
  )
}
ThemeAlert.storyName = '不同样式的 Alert'
